CC 			= gcc
LD 			= gcc

SRCS = grid.c mine.c jeuTexte.c jeuSDL.c play.c
FINAL_TARGET = demineur
LIBS = -lSDL -lSDL_ttf

LDFLAGS  		=
CFLAGS 			= -Wall -pedantic -ansi -ggdb
INCLUDE_DIR 	= -I/usr/include -Isrc -I/usr/include/SDL
OBJ_DIR 		= obj/Debug
SRC_DIR 		= .
BIN_DIR 		= .



default: $(BIN_DIR)/$(FINAL_TARGET)


$(BIN_DIR)/$(FINAL_TARGET): $(SRCS:%.c=$(OBJ_DIR)/%.o)
	$(LD) $+ -o $@ $(LDFLAGS) $(LIB_DIR) $(LIBS)

$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
	$(CC) -c $(CFLAGS) $(INCLUDE_DIR) $< -o $@

clean:
	rm -f $(OBJ_DIR)/*.o $(BIN_DIR)/$(FINAL_TARGET)
